"""
发布消息
"""
import redis
rc = redis.StrictRedis('127.0.0.1',db=0,port=6379)
ret = rc.publish('test','hello world')
#有几个订阅者
print(ret)